Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rs: Pin the cln-grpc dependency. #462

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

Randy808
Copy link
Collaborator

@Randy808 Randy808 commented Jun 5, 2024

When pulling greenlight version 0.2.0 in Rust, I got the following error:

randy@HOME gl % cargo build
   Compiling gl-client v0.2.0 (https://github.com/Blockstream/greenlight.git?rev=3a52042de220f1c6c3de171a6284c6d0177a5168#3a52042d)
error[E0412]: cannot find type `DelexpiredinvoiceRequest` in module `cln`
    --> /Users/randy/.cargo/git/checkouts/greenlight-e41cf58dbd255ee0/3a52042/libs/gl-client/src/signer/model/mod.rs:41:28
     |
41   |     DelExpiredInvoice(cln::DelexpiredinvoiceRequest),
     |                            ^^^^^^^^^^^^^^^^^^^^^^^^ help: a struct with a similar name exists: `DelinvoiceRequest`
     |
    ::: /Users/randy/Desktop/gldemo/gl/target/debug/build/cln-grpc-cdbfd96d73c34bc9/out/cln.rs:1800:1
     |
1800 | pub struct DelinvoiceRequest {
     | ---------------------------- similarly named struct `DelinvoiceRequest` defined here

error[E0433]: failed to resolve: use of undeclared type `DelexpiredinvoiceRequest`
  --> /Users/randy/.cargo/git/checkouts/greenlight-e41cf58dbd255ee0/3a52042/libs/gl-client/src/signer/model/cln.rs:27:62
   |
27 | ...quest::DelExpiredInvoice(DelexpiredinvoiceRequest::decode(p)?),
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^
   |                             |
   |                             use of undeclared type `DelexpiredinvoiceRequest`
   |                             help: a struct with a similar name exists: `DelinvoiceRequest`

error[E0599]: no method named `bolt11` found for reference `&cln_grpc::pb::PreapproveinvoiceRequest` in the current scope
  --> /Users/randy/.cargo/git/checkouts/greenlight-e41cf58dbd255ee0/3a52042/libs/gl-client/src/signer/resolve.rs:97:40
   |
97 |                     l.invstring.0 == r.bolt11().as_bytes()
   |                                        ^^^^^^-- help: remove the arguments
   |                                        |
   |                                        field, not a method

This is because gl-client pulls in cln-grpc 0.1.9 which contains the Core Lightning commit 7e0e39 that removes the DelexpiredinvoiceRequest grpc model. This PR pins the cln-grpc version to 0.1.8 to avoid this breaking change until we're ready to update.

@Randy808 Randy808 requested review from cdecker and nepet June 5, 2024 16:08
libs/gl-client/Cargo.toml Outdated Show resolved Hide resolved
@Randy808 Randy808 force-pushed the pin-cln-grpc-dependency branch from 292edcf to 489ef78 Compare June 12, 2024 18:09
@Randy808 Randy808 force-pushed the pin-cln-grpc-dependency branch from 489ef78 to e6895a3 Compare June 12, 2024 18:10
@cdecker cdecker enabled auto-merge (rebase) June 17, 2024 09:21
@cdecker cdecker merged commit 16fa13d into Blockstream:main Jun 17, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants